package com.example.springboot_test.easyexcel.model.builder.common;

import com.example.springboot_test.easyexcel.model.common.CellShadingModel;
import lombok.Getter;
import org.apache.poi.ss.usermodel.FillPatternType;

/**
 * 单元格底纹信息构造器
 *
 * @author xudongmaster
 */
@Getter
public class CellShadingModelBuilder {
    /**
     * 填充模式（底纹样式）
     */
    private FillPatternType fillPattern;
    /**
     * 背景色
     */
    private Object backgroundColor;
    /**
     * 前景色
     */
    private Object foregroundColor;

    public CellShadingModelBuilder() {

    }

    public CellShadingModelBuilder fillPattern(FillPatternType fillPattern) {
        this.fillPattern = fillPattern;
        return this;
    }

    public CellShadingModelBuilder backgroundColor(Object backgroundColor) {
        this.backgroundColor = backgroundColor;
        return this;
    }

    public CellShadingModelBuilder foregroundColor(Object foregroundColor) {
        this.foregroundColor = foregroundColor;
        return this;
    }

    public CellShadingModel build() {
        return new CellShadingModel(this);
    }
}
